﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Menu.cs" company="ScRePt">
//   Copyright © ScRePt 2010 - 2012
// </copyright>
// <summary>
//   The menu.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace MP3D.Configuration
{
    #region Using Directives

    using System;
    using System.Collections.ObjectModel;
    using System.Xml.Serialization;

    using Helper;

    #endregion

    /// <summary>
    /// The menu.
    /// </summary>
    [Serializable]
    public class Menu
    {
        #region Constructors and Destructors

        /// <summary>
        /// Initializes a new instance of the <see cref="Menu"/> class.
        /// </summary>
        public Menu()
        {
            this.MenuCommandIds = new Collection<int>();
            this.InitialOptionValues = new SerializableDictionary<int, int>();
        }

        #endregion

        #region Enums

        /// <summary>
        /// The menu after command actions.
        /// </summary>
        public enum MenuAfterCommandActions
        {
            /// <summary>
            /// The hide.
            /// </summary>
            Hide = 1, 

            /// <summary>
            /// The visible.
            /// </summary>
            Visible = 2
        }

        /// <summary>
        /// The menu initial option types.
        /// </summary>
        public enum MenuInitialOptionTypes
        {
            /// <summary>
            /// The remember last.
            /// </summary>
            RememberLast = 1, 

            /// <summary>
            /// The from filter property.
            /// </summary>
            FromFilterProperty = 2
        }

        /// <summary>
        /// The menu types.
        /// </summary>
        public enum MenuTypes
        {
            /// <summary>
            /// The osd.
            /// </summary>
            Osd = 1, 

            /// <summary>
            /// The dialog.
            /// </summary>
            Dialog = 2, 

            /// <summary>
            /// The dialog with profiles.
            /// </summary>
            DialogWithProfiles = 3
        }

        #endregion

        #region Properties

        /// <summary>
        /// Gets or sets AfterCommandAction.
        /// </summary>
        [XmlAttribute]
        public MenuAfterCommandActions AfterCommandAction { get; set; }

        /// <summary>
        /// Gets or sets Id.
        /// </summary>
        [XmlAttribute]
        public int Id { get; set; }

        /// <summary>
        /// Gets or sets InitialOption.
        /// </summary>
        [XmlAttribute]
        public int InitialOption { get; set; }

        /// <summary>
        /// Gets or sets InitialOptionPropertyId.
        /// </summary>
        [XmlAttribute]
        public int InitialOptionPropertyId { get; set; }

        /// <summary>
        /// Gets or sets InitialOptionType.
        /// </summary>
        [XmlAttribute]
        public MenuInitialOptionTypes InitialOptionType { get; set; }

        /// <summary>
        /// Gets or sets InitialOptionValues.
        /// </summary>
        public SerializableDictionary<int, int> InitialOptionValues { get; set; }

        /// <summary>
        /// Gets or sets MenuCommandIds.
        /// </summary>
        public Collection<int> MenuCommandIds { get; set; }

        /// <summary>
        /// Gets or sets MenuType.
        /// </summary>
        [XmlAttribute]
        public MenuTypes MenuType { get; set; }

        /// <summary>
        /// Gets or sets Name.
        /// </summary>
        [XmlAttribute]
        public string Name { get; set; }

        #endregion
    }
}